package org.dromara.business.modules.merchant.domain.vo;

import cn.hutool.core.date.DatePattern;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.modules.merchant.domain.BuMerchant;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 商户信息视图对象 bu_merchant
 *
 * @author ckk
 * @date 2025-11-01
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BuMerchant.class)
public class BuMerchantVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 商户ID，自增主键
     */
    @ExcelProperty(value = "商户ID，自增主键")
    private Long id;

    /**
     * 商户名称
     */
    @ExcelProperty(value = "商户名称")
    private String merchantName;

    /**
     * 社会信用代码，唯一标识
     */
    @ExcelProperty(value = "社会信用代码，唯一标识")
    private String creditCode;

    /**
     * 商户分类
     */
    @ExcelProperty(value = "商户分类", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "shfl")
    private String merchantCategory;

    /**
     * 商户分类
     */
    @Translation(type = TransConstant.DICT_TYPE_TO_LABEL, mapper = "merchantCategory", other = "shfl")
    private String merchantCategoryLabel;


    /**
     * 联系人
     */
    @ExcelProperty(value = "联系人")
    private String contactPerson;

    /**
     * 联系电话
     */
    @ExcelProperty(value = "联系电话")
    private String contactPhone;

    /**
     * 状态：0-已审核，1-待审核
     */
    @ExcelProperty(value = "状态：0-已审核，1-待审核")
    private Integer status;

    /**
     * 驳回原因
     */
    @ExcelProperty(value = "驳回原因")
    private String reason;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_MINUTE_PATTERN, timezone = "GMT+8")
    private Date createTime;


}
